package com.hzlx.service;


import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class SimpleMessageListener {
    /**
     * 监听用户服务队列
     */
    @RabbitListener(queues = "user.service.queue") // 显式指定队列名
    public void handleUserMessage(String message) {
        System.out.println("用户服务收到消息：" + message);
        // 业务处理...
    }
}